package com.acensi.guy.multithreading.synchroniser.semaphore;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AtmRoom {
	private  final static int NBR_OF_MACHINE_AVAILABLE = 2 ;
	private final static List<String> clientsNames = Arrays.asList(new String[]{"Mickey", "Daina","Ivy","Toto","Titi"});
	private  AtmMachines machines ;
			
	public List<String> getClientsNames() {
		return clientsNames;
	}

	public AtmMachines getMachines() {
		return machines;
	}

	public void setMachines(AtmMachines machines) {
		this.machines = machines;
	}

	public int getNbrOfMachineAvailable() {
		return NBR_OF_MACHINE_AVAILABLE;
	}


	public static void main(String[] args){  
		    Map<String,String> map = new HashMap<String,String>();
		    AtmRoom atmRoom = new AtmRoom();
		    atmRoom.setMachines(new AtmMachines(NBR_OF_MACHINE_AVAILABLE));
			for(String name:clientsNames){
						new Client(atmRoom.getMachines(),name);
			}
	}

}
